package cc.sheji.controller;


import cc.sheji.Service.InvitationListService;
import cc.sheji.domain.JsonResult;
import cc.sheji.domain.UserFocusQueryCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@RequestMapping(value = "/api/v1/invitation")
public class InvitationListController {

    @Autowired
    InvitationListService invitationListService;

    @GetMapping("/userList")
    public JsonResult invitationUserList( Pageable pageable){
        return JsonResult.Success(invitationListService.invitationUserList(pageable));
    }

    @GetMapping("/list")
    public JsonResult invitationList( Pageable pageable) {
        return JsonResult.Success(invitationListService.invitationList(pageable));
    }


    @GetMapping("/count")
    public JsonResult countInvitation() {
        return JsonResult.Success(invitationListService.countInvitation());
    }
}
